package com.zzyq.pc.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;





/**
 * 通用工具类：时间
 * 
 * 
 * @ClassName: CommonUtils
 */
public class DateSyncUtil {
    private static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
    
    public static String formatDate(Date date)throws ParseException{
    	synchronized(format){
    		return format.format(date);
    	}
    }

    public static Date parse(String strdate)throws ParseException{
    	synchronized(format){
    		return format.parse(strdate);
    	}
    }
}
